package com.armani.service.impl;

import com.armani.entity.ItemImage;
import com.armani.mapper.ImgMapper;
import com.armani.service.ImgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.beans.Transient;
import java.util.Date;
import java.util.List;

/**
 * @ClassName ImgServiceImpl
 * @Description TODO
 * @Author Admin
 * @Date 2021/11/27 9:14
 * @Version 1.0
 **/
@Service
public class ImgServiceImpl implements ImgService {
    @Autowired
private ImgMapper imgMapper;
    @Override
    public List<ItemImage> pageSearch(Integer startRow, Integer limit,Integer id) {
        return imgMapper.pageSearch(startRow,limit,id);
    }

    @Override
    public Integer getCount(Integer id) {
        return imgMapper.getCount(id);
    }

    @Override
    @Transient
    public Integer insert(String image, String descrip, Integer skuId, Integer sort, Integer master, Integer state, Date lastTime) {
        return imgMapper.insert(image, descrip, skuId, sort, master, state, lastTime);
    }

    @Override
    @Transient
    public Integer update(Integer id, String image, String descrip, Integer skuId, Integer sort, Integer master, Integer state, Date lastTime) {
        return imgMapper.update(id, image, descrip, skuId, sort, master, state, lastTime);
    }

    @Override
    @Transient
    public Integer delete(Integer id) {
        return imgMapper.delete(id);
    }
}
